//
//  collection.swift
//  EnglishDictionary
//
//  Created by QFX on 2024/2/29.
//

import UIKit

class Collection:VHLSQLiteObject {
    required public init() {

    }
    public var pkid: Int?
    @objc public var word: String?
    @objc public var sentence: String?
    public var type:Int? //type:0 单词 1：句子
    public var st: String?
    public var fold:String?
}
// 根据条件查询骑行记录数据
extension Collection {
    static func getCollection(fold:String) -> [Collection]? {
        if let rows = try? Collection.rows(filter: "fold ='\(fold)'") {
            return rows
        }
        return nil
     }
    
    static func getCollection(fold:String,type:Int) -> [Collection]? {
        if let rows = try? Collection.rows(filter: "fold ='\(fold)' and type ='\(type)'") {
            return rows
        }
        return nil
     }
}
